<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import= "com.roadmap.struts.action.ActionConst"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%
String user_req_id = (String)request.getParameter(ActionConst.Aspirant_Id_In_Request);
if(user_req_id == null){
	user_req_id = "";
}
String score_req_id = (String)request.getParameter("id");
if(score_req_id == null){
	score_req_id = "";
}
%>
		
			<div id="scoreView" class="state-detail">
				<table class="profile-table" id="scoretable">
					<tr><th colspan="6" class="table-title">
						过去的成就<span style="font-weight: normal;">(<span id="scoreNum"><%=((List)request.getAttribute("scores")).size() %></span>)</span>
					</th></tr>
					
					<logic:present name="<%=ActionConst.Visitor_Is_Owner %>">
					<!-- to be cloned -->
					<tr id="sctrid" style="display:none">
						<td class="row-name"><span id="hdt"></span></td>
						<td class="row-value"><span id="cct"></span>
							<input id="ctd" type="hidden"/><input id="utd" type="hidden"/><input id="asp" type="hidden"/>
						</td>
						
						<logic:present name="<%=ActionConst.Visitor_Is_Owner %>">
						<td class="btn-bar">
							<a id="edit" href="javascript:void(0);" onclick="editScore(this.id);" title="编辑"><img src="res/images/logo/edit_10.png"/></a>&nbsp;&nbsp;
							<a id="delt" href="javascript:void(0);" onclick="deltScore(this.id);" title="删除"><img src="res/images/logo/delete_10.png"/></a>						
						</td>
						</logic:present>
					</tr>
					</logic:present>
					
					<logic:iterate id="achievement" name="scores">
					<bean:define id="scid" name="achievement" property="id"></bean:define>
					<tr id="sctrid<%=scid %>">
						<td class="row-name"><span id="hdt<%=scid %>"><bean:write format="yyyy-MM-dd" name="achievement" property="happenDate"/></span></td>
						<td class="row-value"><span id="cct<%=scid %>"><bean:write name="achievement" property="content"/></span>
							<input id="ctd<%=scid %>" type="hidden" value="<bean:write format='yyyy-MM-dd HH:mm:ss' name='achievement' property='createdTime'/>"/>
							<input id="utd<%=scid %>" type="hidden" value="<bean:write format='yyyy-MM-dd HH:mm:ss' name='achievement' property='updatedTime'/>"/>
							<input id="asp<%=scid %>" type="hidden" value="<bean:write name='achievement' property='aspirantId'/>"/>
						</td>
						
						<logic:present name="<%=ActionConst.Visitor_Is_Owner %>">
						<td class="btn-bar">							
							<a id="edit<%=scid %>" href="javascript:void(0);" onclick="editScore(this.id);" title="编辑"><img src="res/images/logo/edit_10.png"/></a>&nbsp;&nbsp;
							<a id="delt<%=scid %>" href="javascript:void(0);" onclick="deltScore(this.id);" title="删除"><img src="res/images/logo/delete_10.png"/></a>						
						</td>
						</logic:present>
					</tr>
					</logic:iterate>				
				</table>
			</div>
			
			<logic:present name="<%=ActionConst.Visitor_Is_Owner %>">
			<!-- this part can only be viewed by the information owner -->
			<div id="scoreEditDiv" class="state-detail">
				<table class="profile-table">
					<tr><th colspan="5" class="table-title"><span>添加或修改成就</span>
						<span id="scoreMsg" class="prompt-message"></span></th></tr>
					<tr>
						<td class="row-name">收获日期</td>
						<td colspan="4" class="row-value">
							<input type="text" class="shortDate" name="happenDate" maxlength="10" title="收获日期(yyyy-MM-dd)" onfocus="datePicker.showWith(this);"/>
							<input type="hidden" class="input-text" name="id" value="<%=score_req_id %>"/>
							<input type="hidden" class="input-text" name="aspirantId"/>
						</td>						
					</tr>
					<tr>
						<td class="row-name">具体内容</td>
						<td colspan="4" class="row-value"><textarea class="input-text" style="width:400px;height:100px;" name="scoreContent" title="成绩介绍(1~200)"></textarea></td>
					</tr>
					<tr>
						<td></td>
						<td style="color: #7F7F7F;">创建时间</td>
						<td align="left" id="createdTime"></td>
						<td style="color: #7F7F7F;">更新时间</td>
						<td align="left" id="updatedTime"></td>
					</tr>
					<tr>
						<td class="row-name"></td>
						<td colspan="4" class="row-value"><input type="button" class="confirmBtn" value="保存" id="saveBtn" onclick="saveScore(this.id);"/></td>
					</tr>
				</table>
			</div>			
			</logic:present>
